package com.fxcharts.examle.standart;
import javafx.scene.chart.AreaChart;
import javafx.scene.chart.BarChart;
import javafx.scene.chart.BarChart3D;
import javafx.scene.chart.BubbleChart;
import javafx.scene.chart.Chart;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.PieChart;
import javafx.scene.chart.PieChart3D;
import javafx.scene.chart.ScatterChart;
import javafx.scene.chart.XYChart;
import javafx.scene.layout.VBox;

import javafx.scene.paint.Color;
import javafx.scene.chart.part.NumberAxis;
import com.fxcharts.widget.linechart.ExLineChart;
import com.fxcharts.widget.linechart.ExLineAxis;
import com.fxcharts.widget.linechart.ExLineSeries;
import com.fxcharts.widget.linechart.ExLineData;
import com.fxcharts.widget.linechart.ext.*;
import javafx.scene.text.*;



/**
 * @author Aliaksandr_Spichakou
 */
public class StandartCharts
{
    public var vbox:VBox=VBox{width: 500, height: 100};
    
    public function initAreaChart():Void
    {      
        var exLineChart: ExLineChart=ExLineChart{
            chartTitle: "Monthly Sales Summary"
            font: Font.font("Verdana",FontWeight.BOLD,12)
            width: vbox.width,
            hight: vbox.height,			    									
			    									series: [
					    									ExLineSeries{
					    									    	name: "Monthly Sales Summary 2008"
						    										data: [
							    										    ExLineData{xValue: 1,yValue:10000, xValueStr: "Jan", yValueStr: "10k"},
							    										    ExLineData{xValue: 2, yValue:19800, xValueStr: "Feb", yValueStr: "19k"},							    										    
							    										    ExLineData{xValue: 3, yValue:21800, xValueStr: "Mar", yValueStr: "21k"},
							    										    ExLineData{xValue: 4, yValue:23800, xValueStr: "Apr", yValueStr: "23k"},
					    										    		ExLineData{xValue: 5, yValue:29600, xValueStr: "May", yValueStr: "29k"},
					    										    		ExLineData{xValue: 6, yValue:27600, xValueStr: "Jun", yValueStr: "27k"},
					    										    		ExLineData{xValue: 7, yValue:31800, xValueStr: "Jul", yValueStr: "31k"},
					    										    		ExLineData{xValue: 8, yValue:39700, xValueStr: "Aug", yValueStr: "39k"},
					    										  			ExLineData{xValue: 9, yValue:37800, xValueStr: "Sep", yValueStr: "37k"},
					    										    		ExLineData{xValue: 10, yValue:21900, xValueStr: "Oct", yValueStr: "21k"},
					    										    		ExLineData{xValue: 11, yValue:32900, xValueStr: "Nov", yValueStr: "32k"},
							    										    ExLineData{xValue: 12, yValue:39800, xValueStr: "Dec", yValueStr: "39k"},
							    										    
						    											  ]
					    										}	
					    										
			    										ExLineSeries{
																name: "Monthly Sales Summary 2007"
																color: Color.GREEN
																data: [
																	    ExLineData{xValue: 1,yValue:10000, xValueStr: "Jan", yValueStr: "10k"},
																	    ExLineData{xValue: 2, yValue:10800, xValueStr: "Feb", yValueStr: "19k"},							    										    
																	    ExLineData{xValue: 3, yValue:21000, xValueStr: "Mar", yValueStr: "21k"},
																	    ExLineData{xValue: 4, yValue:20000, xValueStr: "Apr", yValueStr: "23k"},
															    		ExLineData{xValue: 5, yValue:29600, xValueStr: "May", yValueStr: "29k"},
															    		ExLineData{xValue: 6, yValue:20000, xValueStr: "Jun", yValueStr: "27k"},
															    		ExLineData{xValue: 7, yValue:30000, xValueStr: "Jul", yValueStr: "31k"},
															    		ExLineData{xValue: 8, yValue:39700, xValueStr: "Aug", yValueStr: "39k"},
															  			ExLineData{xValue: 9, yValue:37000, xValueStr: "Sep", yValueStr: "37k"},
															    		ExLineData{xValue: 10, yValue:21900, xValueStr: "Oct", yValueStr: "21k"},
															    		ExLineData{xValue: 11, yValue:30000, xValueStr: "Nov", yValueStr: "32k"},
																	    ExLineData{xValue: 12, yValue:30000, xValueStr: "Dec", yValueStr: "39k"},
																	    
																	  ]
															}
					    									]		    												    									
													xAxis:ExLineAxis{	
													    			font: Font.font("Verdana",FontWeight.BOLD,14)
													    			showReqLines:false,												    
													    			label: "Month"
													    			upperBound:12;
																	lowerBound:1;
																	tickStrings: ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]																																
																	}
													yAxis:ExLineAxis{		
													    			font: Font.font("Verdana",FontWeight.BOLD,14)											    
													    			label: "Sales"
													    			upperBound:40000;
													    			lowerBound:10000;
													    			tickUnit:5000	
													    			
													    			tickStrings: ["$5k","$10k","$15k","$20k","$25k","$30k","$35k","$40k"]
																	}
													}
		var imgExLineChart: ExLineChart=ImgPointLineChart{
		    									chartTitle: " Chart 2"		    									
		    									animateLines: false;		    									
		    									imageUrl: "file:///D:/projects/skypegmailsync/ChartsDemo/src/com/fxcharts/examle/standart/point.png"
		    									series: [
				    									ExLineSeries{
				    									    	name: "Monthly Sales Summary"				    									    	
					    										data: [
						    										    ExLineData{xValue: 1, yValue:1},
						    										    ExLineData{xValue: 5, yValue:2},
						    										    ExLineData{xValue: 7, yValue:3},
						    										    ExLineData{xValue: 8, yValue:8}
					    											  ]
				    										}
				    										ExLineSeries{
				    										    		name: "Series 2"
				    										    		color: Color.GREEN
							    										data: [
								    										    ExLineData{xValue: 0.5, yValue:6},
								    										    ExLineData{xValue: 1, yValue:5},
								    										    ExLineData{xValue: 4, yValue:3},
								    										    ExLineData{xValue: 8, yValue:8}
							    											  ]
						    										}
				    									]		    												    									
												xAxis:ExLineAxis{
												    			label: "Axis X"
												    			upperBound:10;
																lowerBound:0;																
																}
												yAxis:ExLineAxis{
												    			label: "Axis Y"
												    			upperBound:10;
												    			lowerBound:0;
																}
												}
		insert exLineChart into vbox.content;
		//insert imgExLineChart into vbox.content;
		
		
    }    
}